package com.mes.biz.service.impl;

import java.util.List;

import com.mes.common.core.domain.BaseEntity;
import com.mes.common.core.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.mes.biz.mapper.BizInventoryOrderDetailMapper;
import com.mes.biz.domain.BizInventoryOrderDetail;
import com.mes.biz.service.BizInventoryOrderDetailService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 盘点单详情Service业务层处理
 * @author wy
 * @email wy
 * @date 2023-06-19
 */
@Service
@Transactional(readOnly = true)
public class BizInventoryOrderDetailServiceImpl extends BaseServiceImpl<BizInventoryOrderDetailMapper, BizInventoryOrderDetail> implements BizInventoryOrderDetailService {

    private static final Logger log = LoggerFactory.getLogger(BizInventoryOrderDetailServiceImpl.class);

    /**
     * 获取单条数据
     * @param bizInventoryOrderDetail 盘点单详情
     * @return 盘点单详情
     */
    @Override
    public BizInventoryOrderDetail get(BizInventoryOrderDetail bizInventoryOrderDetail) {
        BizInventoryOrderDetail dto = super.get(bizInventoryOrderDetail);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 盘点单详情id
     * @return 盘点单详情
     */
    @Override
    public BizInventoryOrderDetail get(String id) {
        BizInventoryOrderDetail dto = super.get(id);
        return dto;
    }

    /**
     * 查询盘点单详情列表
     * @param bizInventoryOrderDetail 盘点单详情
     * @return 盘点单详情
     */
    @Override
    public List<BizInventoryOrderDetail> findList(BizInventoryOrderDetail bizInventoryOrderDetail) {
		List<BizInventoryOrderDetail> bizInventoryOrderDetailList = super.findList(bizInventoryOrderDetail);
        return bizInventoryOrderDetailList;
    }

    /**
     * 分页查询盘点单详情列表
     * @param bizInventoryOrderDetail 盘点单详情
     * @return 盘点单详情
     */
    @Override
    public PageInfo<BizInventoryOrderDetail> findPage(BizInventoryOrderDetail bizInventoryOrderDetail) {
		PageInfo<BizInventoryOrderDetail> page = super.findPage(bizInventoryOrderDetail);
        return page;
    }

    /**
     * 保存盘点单详情
     * @param bizInventoryOrderDetail
     * @return 结果
     */
    @Override
    public boolean save(BizInventoryOrderDetail bizInventoryOrderDetail) {
        return super.save(bizInventoryOrderDetail);
    }

    /**
     * 删除盘点单详情信息
     * @param bizInventoryOrderDetail
     * @return 结果
     */
    @Override
    public boolean remove(BizInventoryOrderDetail bizInventoryOrderDetail) {
        return super.remove(bizInventoryOrderDetail);
    }

    /**
     * 批量删除盘点单详情
     * @param ids 需要删除的盘点单详情ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBizInventoryOrderDetailByIds(String[] ids) {
        return mapper.deleteBizInventoryOrderDetailByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

    @Override
    public int deleteBizInventoryOrderDetailByInventoryOrderId(String id) {
        return mapper.deleteBizInventoryOrderDetailByInventoryOrderId(id, BaseEntity.DEL_FLAG_DELETE);
    }

}
